import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooCrontabLogController } from '../../../controllers';
const uctoocrontabLogRouter = new Router();
const crontabLogController = new uctooCrontabLogController();

uctoocrontabLogRouter.post('/add', requireUser, crontabLogController.add);
uctoocrontabLogRouter.post('/edit', requireUser, rowLevelPermission('uctoo/crontab_log'), crontabLogController.edit);
uctoocrontabLogRouter.post('/del', requireUser, rowLevelPermission('uctoo/crontab_log'), crontabLogController.delete);

//For getting crontabLog with permission control
uctoocrontabLogRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/crontab_log'), crontabLogController.getSingle);
uctoocrontabLogRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/crontab_log'), crontabLogController.getMany);
uctoocrontabLogRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/crontab_log'), crontabLogController.getMany);

//#endregion AutoCreateCode
export default uctoocrontabLogRouter;
